﻿package com.eitb.util.logging{
	import flash.external.ExternalInterface;

	public class Logger {
		public static var log:Logger = new Logger();

		public function Logger() {
		}

		public function info(msg:String):void {
			trace("INFO: ".concat(msg));
			try {
				ExternalInterface.call("console.log", "INFO: ".concat(msg));
			} catch (e:Error) {
			}
		}

		public function log(level:Level, msg:String):void {
			trace(level.getId().concat(": ").concat(msg));
			try {
				ExternalInterface.call("console.log", level.getId().concat(": ").concat(msg));
			} catch (e:Error) {
			}
		}
	}
}